//tak arne
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class CommandLine {

	public static String getVersion(){
		String line=null;
		try {
	           Runtime rt = Runtime.getRuntime();
	           Process pr = rt.exec("mysql -V");
	           BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
	         
	           while((line=input.readLine()) != null) {
	               System.out.println(line);
	           }
	           System.out.println("Exit error code: " + pr.waitFor());
	
		} catch(Exception e) {
	           System.out.println(e.toString());
	           e.printStackTrace();
		}
		return line;
   }
}

